<template>
	<div class="info-container">
		<h1 class="title">{{dataDetail.cotitle}}</h1>
		<p class="subtitle">
			<span>发表时间：{{dataDetail.codates}}</span>
			<span>点击次数：{{dataDetail.cohitties}}</span>
		</p>
		
		<hr class="lineHeight" />
		
		<div class="content">
			<span><img src="../../img/1.jpg"/> </span>
			<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{dataDetail.decontent}}</span>
		</div>
		<input-data></input-data>
	</div>
</template>

<script>
	import inputData from '../public/inputData.vue'
	export default {
		data(){
			return {
				id:this.$route.params.id,
				dataDetail:{}
			}
		},
		created(){
			this.show();
		},
		methods:{
			show(){
				this.$http.get('lists/commentDetail/id/'+this.id).then(result=>{
					//console.log(result);
					this.dataDetail=result.body.data;
					//console.log(this.dataDetail.cotitle);
				})
			}
		},
		components:{
			inputData
		}
	}
</script>

<style scoped="scoped">
	.info-container{
		padding: 0 4px;
	}
	.title{
		font-size: 16px;
		text-align: center;
		margin:15px 0;
		color: pink;
	}
	.subtitle{
		font-size: 13px;
		color: #226AFF;
		display: flex;
		justify-content: space-between;
	}
	.content img{
		width: 100%;
		height: 200px;
	}
	.lineHeight{
		border: 2px solid green;
	}
</style>